package uk.ac.lkl.common.associator;



public class AssociatorLink<L, R> {

    private L leftElement;

    private R rightElement;


    public AssociatorLink(
                          L leftElement, R rightElement) {
        this.leftElement = leftElement;
        this.rightElement = rightElement;
    }


    @Override
    public boolean equals(Object object) {
        AssociatorLink other = (AssociatorLink) object;

        return leftElement == other.leftElement
                && rightElement == other.rightElement;
    }


    @Override
    public int hashCode() {
        return leftElement.hashCode() + rightElement.hashCode();
    }

}
